<?php
session_start();
header('Content-Type: text/html; charset=iso-8859-1');
require_once($_SESSION['idioma']);
include_once("../../classes/TpEstd.class.php");
include_once("../../classes/Estd.class.php");
?>
<div id="horari_esquerra"><?php echo utf8_encode($idioma['seleccioni_curs']); ?></div>
<div id="horari_dreta">
	<?php
	if ($_GET['estudi'] != "-1") {
		$tipo= new EstdDAO();
		$llista = $tipo->llistarEstdtpestudi(utf8_decode($_GET['estudi']));
		
		echo "<select id='curs' name='curs' onchange=\"enviarPeticio('POST','moduls/horaris/','llistarAnys.php','horari_any','crearHorari'); actualitzarEstatComboCursos(); \">";
		echo "<option>--------------------------------------------------</option>";
		foreach ($llista as $p){
			echo "<option value='".$p->nom."'>".$p->nom."</option></select>";	
		}	
	} else {
		echo "<select id='curs' name='curs' disabled=\"disabled\">";
		echo "<option value='-1'>--------------------------------------------------</option></select>";	
	}
?>	
</select></div>